package com.springcloud.demo.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author hxg
 * @version 1.0
 * @date 2022/1/5 15:08
 */
@RestController
@RefreshScope
public class ConfigClient {
    @Value("${config.info}")
    private String info;

    @GetMapping("/info")
    public String getPort(){
        return info;
    }
}
